<?php
/**
 * (commands) 同步星级&排名
 */
namespace App\Console\Commands\Operation;

use Illuminate\Console\Command;
use App\Logic\Operation\OperationTotalStar as LOperationTotalStar;
class OperationTotalStar extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'operation:total-star {day}';

    /**
     * The console command description.
     * @var string
     */
    protected $description = 'operation total-star';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     */
    public function handle()
    {
        $day = $this->argument('day');
        if(!$day){
            $this->error('请提供参数!');
        }else{
            LOperationTotalStar::handle($day);
            $this->info('同步完成！');
        }
    }
}
